package com.lamda.zhekou.dao;

import com.lamda.zhekou.model.UserVps;
import com.lamda.zhekou.model.VPS;

import java.util.List;
import java.util.Set;

/**
 * Created by MJiao on 15/8/16.
 */
public interface UserVpsDao extends GenericDao<UserVps> {
    List<UserVps> findVPSRecordListByUserId(Long userId);

    /**
     * 根据userId和 vpsId查询vps使用情况
     * @param userId
     * @param vpsId
     * @return
     */
    UserVps findUserVpsByUserIdAndVpsId(Long userId, Long vpsId);

    List<UserVps> getUserVpsListBy(Set<VPS> serverHostId);

    List<UserVps> findUserVpsListByUserId(Long userId);

    /**
     * 查询指定范围内过期的服务器
     * @param gtDay
     * @param ltDay
     * @return
     */
    public List<UserVps> getLeftDaysVpsList(int gtDay,int ltDay);

    public List<UserVps> getExpiredVpsList();//查询已经到期的机器
}
